Rmd Settings
Sys.setenv(LANG = "en") #English
knitr::opts_chunk$set(echo = TRUE)
rm(list = ls())
path <- getwd()
setwd(path)
# packages
pacman::p_load(tidyverse, plotly,readxl,scales, extrafont,PerformanceAnalytics, GGally, patchwork, ggpubr, DT, estimatr, texreg, modelsummary)
# Font for windows and mac
if (stringr::str_detect(path, pattern="Users")){
theme_set(theme_classic(base_size = 10, base_family = "HiraginoSans-W3")) # For Mac OS
} else{
theme_set(theme_classic(base_size = 10, base_family = "Arial")) # For Windows
}
Contents
WLS regression of suicide on unemployment-rate shock (unemploy_diff2)
dynamic_DID_OLS_notrend: dynamic DID with OLS and without prefectre linear trend
dynamic_DID_WLS_notrend: dynamic DID with WLS and without prefectre linear trend
dynamic_DID_OLS_trend: dynamic DID with OLS and prefectre linear trend
dynamic_DID_WLS_trend: dynamic DID with WLS and prefectre linear trend
dynamic_onlypost_DID_WLS_trend: dynamic DID only and with WLS and prefectre linear trend, reference periods = all the pre-COVID months
_covar8Xcovid_months: with eight covariates interacted with month dummies
Read data/分析用データの読み込み
df_analysis <- readr::read_csv("output/df_analysis.csv")
## Parsed with column specification:
## cols(
## .default = col_double(),
## prefec_kanji = col_character(),
## prefecture = col_character(),
## date = col_date(format = ""),
## prefec = col_character(),
## prefec_kanji2 = col_character()
## )
## See spec(...) for full column specifications.
Main figures in the paper
- We firstly provide estimations and figures used in the main text.
- These chunks are copied and pasted from subsequent outcome-based result sections.
- Actual graphs and tables in the paper are generated and saved in the subsequent chunks, not the chunks in this section. But they are identical.
Y=total sucide rate/男女合計の自殺率
OLS, no trends
# DID estimation
estimation_results <- dynamic_DID_OLS_notrend(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "total_OLS_notrend")
# Event study graph
graph_total_OLS_notrend <- event_study_graph(data = df_estimates,
graph_title = "total_OLS_notrend")
ggplotly(graph_total_OLS_notrend)
estimates_total_OLS_notrend <- df_estimates #for robustness check
WLS, no trends
# DID estimation
estimation_results <- dynamic_DID_WLS_notrend(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "total_WLS_notrend")
# Event study graph
graph_total_WLS_notrend <- event_study_graph(data = df_estimates,
graph_title = "total_WLS_notrend")
ggplotly(graph_total_WLS_notrend)
estimates_total_WLS_notrend <- df_estimates #for robustness check
OLS, with trends
# DID estimation
estimation_results <- dynamic_DID_OLS_trend(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "total_OLS_trend")
# Event study graph
graph_total_OLS_trend <- event_study_graph(data = df_estimates ,
graph_title = "total_OLS_trend")
ggplotly(graph_total_OLS_trend)
estimates_total_OLS_trend <- df_estimates #for robustness check
WLS, with trends, post-covid-month dummies, Table C.1 (2)
# DID estimation
estimation_results <- dynamic_onlypost_DID_WLS_trend(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate,
treat_var = df_analysis$unemploy_shock_diff2)
texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
## 1 coefficient not defined because the design matrix is rank deficient
##
## ===========================================
## Model 1
## -------------------------------------------
## treat_var:date_2020_02 -0.007
## (0.074)
## treat_var:date_2020_03 -0.051
## (0.086)
## treat_var:date_2020_04 0.016
## (0.078)
## treat_var:date_2020_05 0.158
## (0.104)
## treat_var:date_2020_06 0.245 **
## (0.074)
## treat_var:date_2020_07 0.308 ***
## (0.063)
## treat_var:date_2020_08 0.056
## (0.119)
## treat_var:date_2020_09 -0.003
## (0.091)
## as.factor(id)1:year_month_id -0.011 ***
## (0.003)
## as.factor(id)2:year_month_id -0.015 ***
## (0.001)
## as.factor(id)3:year_month_id -0.009 ***
## (0.002)
## as.factor(id)4:year_month_id -0.009 ***
## (0.002)
## as.factor(id)5:year_month_id -0.009 ***
## (0.002)
## as.factor(id)6:year_month_id -0.013 ***
## (0.002)
## as.factor(id)7:year_month_id -0.013 ***
## (0.002)
## as.factor(id)8:year_month_id -0.016 ***
## (0.001)
## as.factor(id)9:year_month_id -0.012 ***
## (0.001)
## as.factor(id)10:year_month_id -0.007 ***
## (0.001)
## as.factor(id)11:year_month_id -0.015 ***
## (0.002)
## as.factor(id)12:year_month_id -0.014 ***
## (0.002)
## as.factor(id)13:year_month_id -0.020 ***
## (0.002)
## as.factor(id)14:year_month_id -0.013 ***
## (0.003)
## as.factor(id)15:year_month_id -0.016 ***
## (0.001)
## as.factor(id)16:year_month_id -0.002
## (0.002)
## as.factor(id)17:year_month_id -0.004 **
## (0.001)
## as.factor(id)18:year_month_id -0.004 ***
## (0.001)
## as.factor(id)19:year_month_id -0.013 ***
## (0.001)
## as.factor(id)20:year_month_id -0.011 ***
## (0.001)
## as.factor(id)21:year_month_id -0.010 ***
## (0.001)
## as.factor(id)22:year_month_id -0.010 ***
## (0.001)
## as.factor(id)23:year_month_id -0.010 ***
## (0.001)
## as.factor(id)24:year_month_id -0.013 ***
## (0.001)
## as.factor(id)25:year_month_id -0.011 ***
## (0.001)
## as.factor(id)26:year_month_id -0.011 ***
## (0.002)
## as.factor(id)27:year_month_id -0.006
## (0.003)
## as.factor(id)28:year_month_id -0.017 ***
## (0.002)
## as.factor(id)29:year_month_id -0.016 ***
## (0.003)
## as.factor(id)30:year_month_id -0.021 ***
## (0.003)
## as.factor(id)31:year_month_id -0.016 ***
## (0.002)
## as.factor(id)32:year_month_id
##
## as.factor(id)33:year_month_id -0.013 ***
## (0.001)
## as.factor(id)34:year_month_id -0.013 ***
## (0.001)
## as.factor(id)35:year_month_id -0.010 ***
## (0.001)
## as.factor(id)36:year_month_id -0.010 ***
## (0.002)
## as.factor(id)37:year_month_id -0.015 ***
## (0.002)
## as.factor(id)38:year_month_id -0.014 ***
## (0.001)
## as.factor(id)39:year_month_id -0.009 ***
## (0.001)
## as.factor(id)40:year_month_id -0.012 ***
## (0.002)
## as.factor(id)41:year_month_id -0.029 ***
## (0.000)
## as.factor(id)42:year_month_id 0.001
## (0.001)
## as.factor(id)43:year_month_id -0.004 **
## (0.001)
## as.factor(id)44:year_month_id -0.019 ***
## (0.002)
## as.factor(id)45:year_month_id -0.008 ***
## (0.001)
## as.factor(id)46:year_month_id -0.007 ***
## (0.002)
## as.factor(id)47:year_month_id -0.011 **
## (0.003)
## -------------------------------------------
## R^2 0.432
## Adj. R^2 0.379
## Num. obs. 1551
## RMSE 12.347
## N Clusters 47
## ===========================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "total_WLS_trend")
# Event study graph
graph_total_WLS_trend_onlypost <- event_study_graph(data = df_estimates ,
graph_title = "total_WLS_trend")
ggplotly(graph_total_WLS_trend_onlypost)
estimates_total_WLS_trend_onlypost <- df_estimates #for robustness check
results_total_WLS_trend_onlypost <- estimation_results # for only-post DID table
Y=total suicide rate/男女合計の自殺率 with covar
OLS, no trends
# DID estimation
estimation_results <- dynamic_DID_OLS_notrend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate,
treat_var = df_analysis$unemploy_shock_diff2)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "total_OLS_notrend")
# Event study graph
graph_total_OLS_notrend_covar <- event_study_graph(data = df_estimates,
graph_title = "total_OLS_notrend")
ggplotly(graph_total_OLS_notrend_covar)
estimates_total_OLS_notrend_covar <- df_estimates #for robustness check
WLS, no trends
# DID estimation
estimation_results <- dynamic_DID_WLS_notrend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate,
treat_var = df_analysis$unemploy_shock_diff2)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "total_WLS_notrend")
# Event study graph
graph_total_WLS_notrend_covar <- event_study_graph(data = df_estimates,
graph_title = "total_WLS_notrend")
ggplotly(graph_total_WLS_notrend_covar)
estimates_total_WLS_notrend_covar <- df_estimates #for robustness check
OLS, with trends
# DID estimation
estimation_results <- dynamic_DID_OLS_trend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate,
treat_var = df_analysis$unemploy_shock_diff2)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "total_OLS_trend")
# Event study graph
graph_total_OLS_trend_covar <- event_study_graph(data = df_estimates ,
graph_title = "total_OLS_trend")
ggplotly(graph_total_OLS_trend_covar)
estimates_total_OLS_trend_covar <- df_estimates #for robustness check
WLS, with trends, post-covid-month dummies, Table C.2 (2)
# DID estimation
estimation_results <- dynamic_onlypost_DID_WLS_trend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate,
treat_var = df_analysis$unemploy_shock_diff2)
texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
## 1 coefficient not defined because the design matrix is rank deficient
##
## ====================================================================
## Model 1
## --------------------------------------------------------------------
## treat_var:date_2020_02 -0.294 *
## (0.138)
## treat_var:date_2020_03 -0.113
## (0.162)
## treat_var:date_2020_04 -0.016
## (0.106)
## treat_var:date_2020_05 0.078
## (0.165)
## treat_var:date_2020_06 0.080
## (0.140)
## treat_var:date_2020_07 0.400 **
## (0.148)
## treat_var:date_2020_08 -0.270
## (0.165)
## treat_var:date_2020_09 -0.058
## (0.168)
## date_2020_02:google_mobility_index_2020may 0.006
## (0.021)
## date_2020_03:google_mobility_index_2020may 0.010
## (0.031)
## date_2020_04:google_mobility_index_2020may 0.013
## (0.026)
## date_2020_05:google_mobility_index_2020may -0.034
## (0.028)
## date_2020_06:google_mobility_index_2020may 0.032 *
## (0.015)
## date_2020_07:google_mobility_index_2020may -0.007
## (0.024)
## date_2020_08:google_mobility_index_2020may 0.061
## (0.039)
## date_2020_09:google_mobility_index_2020may 0.014
## (0.033)
## date_2020_02:infection_rate_cumulative2020jun -0.019
## (0.014)
## date_2020_03:infection_rate_cumulative2020jun -0.004
## (0.020)
## date_2020_04:infection_rate_cumulative2020jun -0.021
## (0.013)
## date_2020_05:infection_rate_cumulative2020jun -0.025
## (0.019)
## date_2020_06:infection_rate_cumulative2020jun 0.013
## (0.012)
## date_2020_07:infection_rate_cumulative2020jun 0.005
## (0.016)
## date_2020_08:infection_rate_cumulative2020jun 0.007
## (0.023)
## date_2020_09:infection_rate_cumulative2020jun 0.016
## (0.017)
## date_2020_02:death_rate_cumulative2020jun 0.122
## (0.152)
## date_2020_03:death_rate_cumulative2020jun 0.024
## (0.228)
## date_2020_04:death_rate_cumulative2020jun 0.285
## (0.175)
## date_2020_05:death_rate_cumulative2020jun 0.138
## (0.224)
## date_2020_06:death_rate_cumulative2020jun 0.050
## (0.129)
## date_2020_07:death_rate_cumulative2020jun -0.136
## (0.165)
## date_2020_08:death_rate_cumulative2020jun -0.025
## (0.279)
## date_2020_09:death_rate_cumulative2020jun -0.184
## (0.170)
## date_2020_02:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_03:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_04:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_05:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_06:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_07:Population_per_1_km_2_of_inhabitable_area -0.000
## (0.000)
## date_2020_08:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_09:Population_per_1_km_2_of_inhabitable_area -0.000
## (0.000)
## date_2020_02:Secondary_industry_ratio -1.363
## (1.984)
## date_2020_03:Secondary_industry_ratio 0.082
## (2.467)
## date_2020_04:Secondary_industry_ratio 0.590
## (1.809)
## date_2020_05:Secondary_industry_ratio 0.274
## (2.068)
## date_2020_06:Secondary_industry_ratio 3.038
## (1.525)
## date_2020_07:Secondary_industry_ratio -3.794 *
## (1.831)
## date_2020_08:Secondary_industry_ratio 1.878
## (1.890)
## date_2020_09:Secondary_industry_ratio 0.236
## (1.551)
## date_2020_02:Tertiary_industry_ratio 0.606
## (2.437)
## date_2020_03:Tertiary_industry_ratio 0.734
## (3.085)
## date_2020_04:Tertiary_industry_ratio 2.087
## (2.102)
## date_2020_05:Tertiary_industry_ratio -0.860
## (2.975)
## date_2020_06:Tertiary_industry_ratio 3.977 *
## (1.726)
## date_2020_07:Tertiary_industry_ratio -5.813 *
## (2.533)
## date_2020_08:Tertiary_industry_ratio 4.725
## (2.887)
## date_2020_09:Tertiary_industry_ratio 0.506
## (2.207)
## date_2020_02:Total_population 0.000
## (0.000)
## date_2020_03:Total_population 0.000
## (0.000)
## date_2020_04:Total_population 0.000
## (0.000)
## date_2020_05:Total_population 0.001 *
## (0.000)
## date_2020_06:Total_population 0.000
## (0.000)
## date_2020_07:Total_population 0.000
## (0.000)
## date_2020_08:Total_population -0.000
## (0.000)
## date_2020_09:Total_population 0.000
## (0.000)
## date_2020_02:Ratio_of_aged_population -0.007
## (0.015)
## date_2020_03:Ratio_of_aged_population 0.000
## (0.017)
## date_2020_04:Ratio_of_aged_population 0.001
## (0.012)
## date_2020_05:Ratio_of_aged_population 0.036 **
## (0.013)
## date_2020_06:Ratio_of_aged_population -0.000
## (0.008)
## date_2020_07:Ratio_of_aged_population 0.009
## (0.012)
## date_2020_08:Ratio_of_aged_population -0.020
## (0.017)
## date_2020_09:Ratio_of_aged_population 0.008
## (0.017)
## as.factor(id)1:year_month_id 0.006
## (0.003)
## as.factor(id)2:year_month_id -0.001
## (0.001)
## as.factor(id)3:year_month_id 0.006 ***
## (0.001)
## as.factor(id)4:year_month_id 0.009 ***
## (0.002)
## as.factor(id)5:year_month_id 0.005
## (0.003)
## as.factor(id)6:year_month_id 0.004
## (0.004)
## as.factor(id)7:year_month_id 0.005
## (0.003)
## as.factor(id)8:year_month_id 0.001
## (0.002)
## as.factor(id)9:year_month_id 0.006 *
## (0.003)
## as.factor(id)10:year_month_id 0.009 **
## (0.003)
## as.factor(id)11:year_month_id 0.001
## (0.003)
## as.factor(id)12:year_month_id 0.003
## (0.004)
## as.factor(id)13:year_month_id -0.006 *
## (0.003)
## as.factor(id)14:year_month_id 0.003
## (0.003)
## as.factor(id)15:year_month_id -0.001
## (0.003)
## as.factor(id)16:year_month_id 0.015 ***
## (0.004)
## as.factor(id)17:year_month_id 0.015 ***
## (0.003)
## as.factor(id)18:year_month_id 0.011 ***
## (0.003)
## as.factor(id)19:year_month_id 0.006
## (0.004)
## as.factor(id)20:year_month_id 0.006
## (0.004)
## as.factor(id)21:year_month_id 0.007
## (0.003)
## as.factor(id)22:year_month_id 0.007
## (0.004)
## as.factor(id)23:year_month_id 0.005
## (0.003)
## as.factor(id)24:year_month_id 0.004
## (0.003)
## as.factor(id)25:year_month_id 0.009 **
## (0.003)
## as.factor(id)26:year_month_id 0.009 *
## (0.003)
## as.factor(id)27:year_month_id 0.009 ***
## (0.003)
## as.factor(id)28:year_month_id -0.001
## (0.003)
## as.factor(id)29:year_month_id 0.002
## (0.003)
## as.factor(id)30:year_month_id -0.002
## (0.003)
## as.factor(id)31:year_month_id
##
## as.factor(id)32:year_month_id 0.012 **
## (0.004)
## as.factor(id)33:year_month_id 0.003
## (0.002)
## as.factor(id)34:year_month_id 0.003
## (0.003)
## as.factor(id)35:year_month_id 0.004
## (0.004)
## as.factor(id)36:year_month_id 0.007 **
## (0.002)
## as.factor(id)37:year_month_id 0.003
## (0.003)
## as.factor(id)38:year_month_id 0.001
## (0.002)
## as.factor(id)39:year_month_id 0.006 *
## (0.002)
## as.factor(id)40:year_month_id 0.004
## (0.003)
## as.factor(id)41:year_month_id -0.014 ***
## (0.002)
## as.factor(id)42:year_month_id 0.015 ***
## (0.002)
## as.factor(id)43:year_month_id 0.011 ***
## (0.001)
## as.factor(id)44:year_month_id -0.003
## (0.002)
## as.factor(id)45:year_month_id 0.006 ***
## (0.001)
## as.factor(id)46:year_month_id 0.008 ***
## (0.001)
## as.factor(id)47:year_month_id 0.014 *
## (0.006)
## --------------------------------------------------------------------
## R^2 0.457
## Adj. R^2 0.378
## Num. obs. 1551
## RMSE 12.357
## N Clusters 47
## ====================================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "total_WLS_trend")
# Event study graph
graph_total_WLS_trend_covar_onlypost <- event_study_graph(data = df_estimates,
graph_title = "total_WLS_trend")
ggplotly(graph_total_WLS_trend_covar_onlypost)
estimates_total_WLS_trend_covar_onlypost <- df_estimates #for robustness check
results_total_WLS_trend_covar_onlypost <- estimation_results # for only-post DID table
Y=total suicide rate (YOY)/男女合計の自殺率(前年同月差)
OLS, no trends
# DID estimation
estimation_results <- dynamic_DID_OLS_notrend(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate,
treat_var = df_analysis$unemploy_shock_diff2)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_total_OLS_notrend")
# Event study graph
graph_yoy_total_OLS_notrend <- event_study_graph(data = df_estimates,
graph_title = "yoy_total_OLS_notrend")
ggplotly(graph_yoy_total_OLS_notrend)
estimates_yoy_total_OLS_notrend <- df_estimates #for robustness check
WLS, no trends
# DID estimation
estimation_results <- dynamic_DID_WLS_notrend(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate,
treat_var = df_analysis$unemploy_shock_diff2)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_total_WLS_notrend")
# Event study graph
graph_yoy_total_WLS_notrend <- event_study_graph(data = df_estimates,
graph_title = "yoy_total_WLS_notrend")
ggplotly(graph_yoy_total_WLS_notrend)
estimates_yoy_total_WLS_notrend <- df_estimates #for robustness check
OLS, with trends
# DID estimation
estimation_results <- dynamic_DID_OLS_trend(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate,
treat_var = df_analysis$unemploy_shock_diff2)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_total_OLS_trend")
# Event study graph
graph_yoy_total_OLS_trend <- event_study_graph(data = df_estimates,
graph_title = "yoy_total_OLS_trend")
ggplotly(graph_yoy_total_OLS_trend)
estimates_yoy_total_OLS_trend <- df_estimates #for robustness check
WLS, with trends
# DID estimation
estimation_results <- dynamic_DID_WLS_trend(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate,
treat_var = df_analysis$unemploy_shock_diff2)
texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
## 2 coefficients not defined because the design matrix is rank deficient
##
## ===========================================
## Model 1
## -------------------------------------------
## treat_var:date_2018_01
##
## treat_var:date_2018_02 0.053
## (0.161)
## treat_var:date_2018_03 0.068
## (0.114)
## treat_var:date_2018_04 0.030
## (0.112)
## treat_var:date_2018_05 -0.156
## (0.119)
## treat_var:date_2018_06 0.095
## (0.114)
## treat_var:date_2018_07 -0.016
## (0.140)
## treat_var:date_2018_08 0.154
## (0.138)
## treat_var:date_2018_09 -0.047
## (0.176)
## treat_var:date_2018_10 -0.027
## (0.142)
## treat_var:date_2018_11 -0.066
## (0.095)
## treat_var:date_2018_12 0.160
## (0.194)
## treat_var:date_2019_01 -0.007
## (0.158)
## treat_var:date_2019_02 0.103
## (0.138)
## treat_var:date_2019_03 -0.089
## (0.147)
## treat_var:date_2019_04 0.013
## (0.146)
## treat_var:date_2019_05 0.207
## (0.156)
## treat_var:date_2019_06 -0.068
## (0.126)
## treat_var:date_2019_07 0.004
## (0.118)
## treat_var:date_2019_08 -0.235
## (0.146)
## treat_var:date_2019_09 0.084
## (0.135)
## treat_var:date_2019_10 0.085
## (0.134)
## treat_var:date_2019_11 -0.022
## (0.139)
## treat_var:date_2019_12 0.019
## (0.139)
## treat_var:date_2020_02 -0.079
## (0.124)
## treat_var:date_2020_03 0.094
## (0.172)
## treat_var:date_2020_04 0.048
## (0.134)
## treat_var:date_2020_05 0.126
## (0.118)
## treat_var:date_2020_06 0.272
## (0.221)
## treat_var:date_2020_07 0.332 *
## (0.141)
## treat_var:date_2020_08 0.258
## (0.186)
## treat_var:date_2020_09 0.011
## (0.174)
## as.factor(id)1:year_month_id -0.023 ***
## (0.006)
## as.factor(id)2:year_month_id -0.010 **
## (0.003)
## as.factor(id)3:year_month_id -0.023 ***
## (0.004)
## as.factor(id)4:year_month_id -0.016 ***
## (0.004)
## as.factor(id)5:year_month_id -0.017 ***
## (0.004)
## as.factor(id)6:year_month_id -0.021 ***
## (0.004)
## as.factor(id)7:year_month_id -0.023 ***
## (0.004)
## as.factor(id)8:year_month_id -0.019 ***
## (0.002)
## as.factor(id)9:year_month_id -0.018 ***
## (0.002)
## as.factor(id)10:year_month_id -0.017 ***
## (0.002)
## as.factor(id)11:year_month_id -0.021 ***
## (0.005)
## as.factor(id)12:year_month_id -0.019 ***
## (0.005)
## as.factor(id)13:year_month_id -0.024 ***
## (0.005)
## as.factor(id)14:year_month_id -0.015 *
## (0.007)
## as.factor(id)15:year_month_id -0.021 ***
## (0.003)
## as.factor(id)16:year_month_id -0.003
## (0.003)
## as.factor(id)17:year_month_id -0.003
## (0.003)
## as.factor(id)18:year_month_id -0.007 **
## (0.002)
## as.factor(id)19:year_month_id -0.031 ***
## (0.003)
## as.factor(id)20:year_month_id -0.021 ***
## (0.002)
## as.factor(id)21:year_month_id -0.014 ***
## (0.002)
## as.factor(id)22:year_month_id -0.019 ***
## (0.003)
## as.factor(id)23:year_month_id -0.012 ***
## (0.003)
## as.factor(id)24:year_month_id -0.014 ***
## (0.003)
## as.factor(id)25:year_month_id -0.021 ***
## (0.003)
## as.factor(id)26:year_month_id -0.011 *
## (0.004)
## as.factor(id)27:year_month_id -0.022 **
## (0.006)
## as.factor(id)28:year_month_id -0.022 ***
## (0.005)
## as.factor(id)29:year_month_id -0.035 ***
## (0.006)
## as.factor(id)30:year_month_id -0.025 ***
## (0.006)
## as.factor(id)31:year_month_id -0.005
## (0.004)
## as.factor(id)32:year_month_id
##
## as.factor(id)33:year_month_id -0.022 ***
## (0.003)
## as.factor(id)34:year_month_id -0.020 ***
## (0.003)
## as.factor(id)35:year_month_id -0.011 **
## (0.003)
## as.factor(id)36:year_month_id -0.007
## (0.004)
## as.factor(id)37:year_month_id -0.018 ***
## (0.003)
## as.factor(id)38:year_month_id -0.011 **
## (0.003)
## as.factor(id)39:year_month_id -0.019 ***
## (0.003)
## as.factor(id)40:year_month_id -0.014 ***
## (0.004)
## as.factor(id)41:year_month_id -0.044 ***
## (0.001)
## as.factor(id)42:year_month_id -0.017 ***
## (0.003)
## as.factor(id)43:year_month_id -0.010 ***
## (0.003)
## as.factor(id)44:year_month_id -0.022 ***
## (0.004)
## as.factor(id)45:year_month_id -0.020 ***
## (0.003)
## as.factor(id)46:year_month_id -0.009 *
## (0.004)
## as.factor(id)47:year_month_id -0.026 ***
## (0.007)
## -------------------------------------------
## R^2 0.172
## Adj. R^2 0.080
## Num. obs. 1551
## RMSE 17.156
## N Clusters 47
## ===========================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_total_WLS_trend")
# Event study graph
graph_yoy_total_WLS_trend <- event_study_graph(data = df_estimates,
graph_title = "yoy_total_WLS_trend")
ggplotly(graph_yoy_total_WLS_trend)
estimates_yoy_total_WLS_trend <- df_estimates #for robustness check
Y=total suicde rate(YOY)/男女合計の自殺率(前年同月差)with covar
OLS, no trends
# DID estimation
estimation_results <- dynamic_DID_OLS_notrend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_total_OLS_notrend")
# Event study graph
graph_yoy_total_OLS_notrend_covar <- event_study_graph(data = df_estimates,
graph_title = "yoy_total_OLS_notrend")
graph_yoy_total_OLS_notrend_covar
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_yoy_total_OLS_notrend_covar <- df_estimates #for robustness check
WLS, no trends
# DID estimation
estimation_results <- dynamic_DID_WLS_notrend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_total_WLS_notrend")
# Event study graph
graph_yoy_total_WLS_notrend_covar <- event_study_graph(data = df_estimates,
graph_title = "yoy_total_WLS_notrend")
graph_yoy_total_WLS_notrend_covar
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_yoy_total_WLS_notrend_covar <- df_estimates #for robustness check
OLS, with trends
# DID estimation
estimation_results <- dynamic_DID_OLS_trend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_total_OLS_trend")
# Event study graph
graph_yoy_total_OLS_trend_covar <- event_study_graph(data = df_estimates,
graph_title = "yoy_total_OLS_trend")
graph_yoy_total_OLS_trend_covar
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_yoy_total_OLS_trend_covar <- df_estimates #for robustness check
WLS, with trends
# DID estimation
estimation_results <- dynamic_DID_WLS_trend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate,
treat_var = df_analysis$unemploy_shock_diff2)
texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
## 2 coefficients not defined because the design matrix is rank deficient
##
## ====================================================================
## Model 1
## --------------------------------------------------------------------
## treat_var:date_2018_01
##
## treat_var:date_2018_02 0.053
## (0.165)
## treat_var:date_2018_03 0.068
## (0.117)
## treat_var:date_2018_04 0.030
## (0.115)
## treat_var:date_2018_05 -0.156
## (0.122)
## treat_var:date_2018_06 0.095
## (0.117)
## treat_var:date_2018_07 -0.016
## (0.143)
## treat_var:date_2018_08 0.154
## (0.141)
## treat_var:date_2018_09 -0.047
## (0.181)
## treat_var:date_2018_10 -0.027
## (0.146)
## treat_var:date_2018_11 -0.066
## (0.097)
## treat_var:date_2018_12 0.160
## (0.198)
## treat_var:date_2019_01 -0.007
## (0.162)
## treat_var:date_2019_02 0.103
## (0.142)
## treat_var:date_2019_03 -0.089
## (0.151)
## treat_var:date_2019_04 0.013
## (0.149)
## treat_var:date_2019_05 0.207
## (0.159)
## treat_var:date_2019_06 -0.068
## (0.129)
## treat_var:date_2019_07 0.004
## (0.121)
## treat_var:date_2019_08 -0.235
## (0.149)
## treat_var:date_2019_09 0.084
## (0.139)
## treat_var:date_2019_10 0.085
## (0.138)
## treat_var:date_2019_11 -0.022
## (0.142)
## treat_var:date_2019_12 0.019
## (0.142)
## treat_var:date_2020_02 -0.185
## (0.211)
## treat_var:date_2020_03 -0.166
## (0.219)
## treat_var:date_2020_04 -0.078
## (0.173)
## treat_var:date_2020_05 0.077
## (0.229)
## treat_var:date_2020_06 -0.043
## (0.289)
## treat_var:date_2020_07 0.447 *
## (0.167)
## treat_var:date_2020_08 -0.226
## (0.261)
## treat_var:date_2020_09 -0.005
## (0.303)
## date_2020_02:google_mobility_index_2020may 0.040
## (0.029)
## date_2020_03:google_mobility_index_2020may -0.001
## (0.043)
## date_2020_04:google_mobility_index_2020may -0.002
## (0.044)
## date_2020_05:google_mobility_index_2020may -0.009
## (0.042)
## date_2020_06:google_mobility_index_2020may 0.073 *
## (0.033)
## date_2020_07:google_mobility_index_2020may -0.051
## (0.039)
## date_2020_08:google_mobility_index_2020may 0.076
## (0.065)
## date_2020_09:google_mobility_index_2020may 0.049
## (0.040)
## date_2020_02:infection_rate_cumulative2020jun 0.013
## (0.018)
## date_2020_03:infection_rate_cumulative2020jun 0.012
## (0.026)
## date_2020_04:infection_rate_cumulative2020jun -0.003
## (0.019)
## date_2020_05:infection_rate_cumulative2020jun 0.004
## (0.025)
## date_2020_06:infection_rate_cumulative2020jun 0.036
## (0.024)
## date_2020_07:infection_rate_cumulative2020jun 0.006
## (0.018)
## date_2020_08:infection_rate_cumulative2020jun 0.044
## (0.033)
## date_2020_09:infection_rate_cumulative2020jun 0.018
## (0.029)
## date_2020_02:death_rate_cumulative2020jun -0.293
## (0.249)
## date_2020_03:death_rate_cumulative2020jun -0.094
## (0.275)
## date_2020_04:death_rate_cumulative2020jun 0.111
## (0.190)
## date_2020_05:death_rate_cumulative2020jun -0.278
## (0.273)
## date_2020_06:death_rate_cumulative2020jun -0.002
## (0.277)
## date_2020_07:death_rate_cumulative2020jun -0.308
## (0.190)
## date_2020_08:death_rate_cumulative2020jun -0.591
## (0.373)
## date_2020_09:death_rate_cumulative2020jun -0.239
## (0.275)
## date_2020_02:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_03:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_04:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_05:Population_per_1_km_2_of_inhabitable_area -0.000
## (0.000)
## date_2020_06:Population_per_1_km_2_of_inhabitable_area -0.000
## (0.000)
## date_2020_07:Population_per_1_km_2_of_inhabitable_area -0.000
## (0.000)
## date_2020_08:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_09:Population_per_1_km_2_of_inhabitable_area -0.000
## (0.000)
## date_2020_02:Secondary_industry_ratio -1.831
## (2.722)
## date_2020_03:Secondary_industry_ratio 1.112
## (3.309)
## date_2020_04:Secondary_industry_ratio 1.372
## (2.803)
## date_2020_05:Secondary_industry_ratio -0.064
## (2.486)
## date_2020_06:Secondary_industry_ratio 1.988
## (2.557)
## date_2020_07:Secondary_industry_ratio -6.457 *
## (2.489)
## date_2020_08:Secondary_industry_ratio 2.657
## (2.923)
## date_2020_09:Secondary_industry_ratio 0.345
## (2.372)
## date_2020_02:Tertiary_industry_ratio -0.719
## (3.087)
## date_2020_03:Tertiary_industry_ratio 3.935
## (3.836)
## date_2020_04:Tertiary_industry_ratio 2.466
## (3.626)
## date_2020_05:Tertiary_industry_ratio -2.358
## (3.553)
## date_2020_06:Tertiary_industry_ratio 4.379
## (3.226)
## date_2020_07:Tertiary_industry_ratio -9.118 **
## (2.818)
## date_2020_08:Tertiary_industry_ratio 5.853
## (4.916)
## date_2020_09:Tertiary_industry_ratio 1.269
## (3.272)
## date_2020_02:Total_population 0.000
## (0.001)
## date_2020_03:Total_population -0.000
## (0.000)
## date_2020_04:Total_population -0.000
## (0.000)
## date_2020_05:Total_population 0.001 *
## (0.000)
## date_2020_06:Total_population 0.000
## (0.000)
## date_2020_07:Total_population 0.000
## (0.000)
## date_2020_08:Total_population 0.001
## (0.001)
## date_2020_09:Total_population 0.001
## (0.000)
## date_2020_02:Ratio_of_aged_population -0.015
## (0.019)
## date_2020_03:Ratio_of_aged_population -0.001
## (0.023)
## date_2020_04:Ratio_of_aged_population 0.002
## (0.018)
## date_2020_05:Ratio_of_aged_population 0.015
## (0.022)
## date_2020_06:Ratio_of_aged_population -0.015
## (0.016)
## date_2020_07:Ratio_of_aged_population 0.009
## (0.019)
## date_2020_08:Ratio_of_aged_population -0.031
## (0.029)
## date_2020_09:Ratio_of_aged_population -0.011
## (0.023)
## as.factor(id)1:year_month_id -0.017 **
## (0.006)
## as.factor(id)2:year_month_id -0.008 ***
## (0.002)
## as.factor(id)3:year_month_id -0.019 ***
## (0.002)
## as.factor(id)4:year_month_id -0.012 **
## (0.004)
## as.factor(id)5:year_month_id -0.013 **
## (0.005)
## as.factor(id)6:year_month_id -0.017 **
## (0.006)
## as.factor(id)7:year_month_id -0.019 **
## (0.006)
## as.factor(id)8:year_month_id -0.014 **
## (0.005)
## as.factor(id)9:year_month_id -0.014 *
## (0.006)
## as.factor(id)10:year_month_id -0.008
## (0.005)
## as.factor(id)11:year_month_id -0.019 ***
## (0.004)
## as.factor(id)12:year_month_id -0.016 **
## (0.006)
## as.factor(id)13:year_month_id -0.027 ***
## (0.005)
## as.factor(id)14:year_month_id -0.010
## (0.005)
## as.factor(id)15:year_month_id -0.019 ***
## (0.004)
## as.factor(id)16:year_month_id 0.010
## (0.006)
## as.factor(id)17:year_month_id 0.009
## (0.006)
## as.factor(id)18:year_month_id -0.004
## (0.005)
## as.factor(id)19:year_month_id -0.025 ***
## (0.007)
## as.factor(id)20:year_month_id -0.016 *
## (0.007)
## as.factor(id)21:year_month_id -0.009
## (0.006)
## as.factor(id)22:year_month_id -0.014 *
## (0.006)
## as.factor(id)23:year_month_id -0.012 *
## (0.005)
## as.factor(id)24:year_month_id -0.008
## (0.005)
## as.factor(id)25:year_month_id -0.018 *
## (0.007)
## as.factor(id)26:year_month_id -0.003
## (0.005)
## as.factor(id)27:year_month_id -0.018 ***
## (0.005)
## as.factor(id)28:year_month_id -0.017 **
## (0.005)
## as.factor(id)29:year_month_id -0.028 ***
## (0.005)
## as.factor(id)30:year_month_id -0.016 ***
## (0.004)
## as.factor(id)31:year_month_id
##
## as.factor(id)32:year_month_id 0.000
## (0.006)
## as.factor(id)33:year_month_id -0.017 ***
## (0.003)
## as.factor(id)34:year_month_id -0.017 ***
## (0.005)
## as.factor(id)35:year_month_id -0.006
## (0.005)
## as.factor(id)36:year_month_id 0.002
## (0.004)
## as.factor(id)37:year_month_id -0.011 *
## (0.004)
## as.factor(id)38:year_month_id -0.005
## (0.003)
## as.factor(id)39:year_month_id -0.015 **
## (0.004)
## as.factor(id)40:year_month_id -0.015 **
## (0.004)
## as.factor(id)41:year_month_id -0.045 ***
## (0.004)
## as.factor(id)42:year_month_id -0.013 **
## (0.004)
## as.factor(id)43:year_month_id -0.006 *
## (0.003)
## as.factor(id)44:year_month_id -0.017 ***
## (0.003)
## as.factor(id)45:year_month_id -0.018 ***
## (0.002)
## as.factor(id)46:year_month_id -0.005 *
## (0.002)
## as.factor(id)47:year_month_id -0.014
## (0.007)
## --------------------------------------------------------------------
## R^2 0.217
## Adj. R^2 0.089
## Num. obs. 1551
## RMSE 17.079
## N Clusters 47
## ====================================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_total_WLS_trend")
# Event study graph
graph_yoy_total_WLS_trend_covar <- event_study_graph(data = df_estimates,
graph_title = "yoy_total_WLS_trend")
ggplotly(graph_yoy_total_WLS_trend_covar)
estimates_yoy_total_WLS_trend_covar <- df_estimates #for robustness check
Y=female suicide rate/女性の自殺率
OLS, no trends
# DID estimation
estimation_results <- dynamic_DID_OLS_notrend(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate_female,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "female_OLS_notrend")
# Event study graph
graph_female_OLS_notrend <- event_study_graph(data = df_estimates,
graph_title = "female_OLS_notrend")
graph_female_OLS_notrend
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_female_OLS_notrend <- df_estimates #for robustness check
WLS, no trends
# DID estimation
estimation_results <- dynamic_DID_WLS_notrend(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate_female,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "female_WLS_notrend")
# Event study graph
graph_female_WLS_notrend <- event_study_graph(data = df_estimates,
graph_title = "female_WLS_notrend")
ggplotly(graph_female_WLS_notrend)
estimates_female_WLS_notrend <- df_estimates #for robustness check
OLS, with trends
# DID estimation
estimation_results <- dynamic_DID_OLS_trend(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate_female,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "female_OLS_trend")
# Event study graph
graph_female_OLS_trend <- event_study_graph(data = df_estimates,
graph_title = "female_OLS_trend")
ggplotly(graph_female_OLS_trend)
estimates_female_OLS_trend <- df_estimates #for robustness check
WLS, with trends, post-covid-month dummies, Table C.1 (4)
# DID estimation
estimation_results <- dynamic_onlypost_DID_WLS_trend(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate_female,
treat_var = df_analysis$unemploy_shock_diff2)
texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
## 1 coefficient not defined because the design matrix is rank deficient
##
## ===========================================
## Model 1
## -------------------------------------------
## treat_var:date_2020_02 0.022
## (0.097)
## treat_var:date_2020_03 -0.068
## (0.086)
## treat_var:date_2020_04 -0.011
## (0.089)
## treat_var:date_2020_05 0.119
## (0.093)
## treat_var:date_2020_06 0.025
## (0.063)
## treat_var:date_2020_07 0.217
## (0.124)
## treat_var:date_2020_08 0.022
## (0.089)
## treat_var:date_2020_09 -0.033
## (0.079)
## as.factor(id)1:year_month_id 0.008 ***
## (0.002)
## as.factor(id)2:year_month_id 0.000
## (0.001)
## as.factor(id)3:year_month_id 0.005 ***
## (0.001)
## as.factor(id)4:year_month_id 0.008 ***
## (0.002)
## as.factor(id)5:year_month_id -0.000
## (0.002)
## as.factor(id)6:year_month_id 0.006 ***
## (0.002)
## as.factor(id)7:year_month_id 0.003
## (0.001)
## as.factor(id)8:year_month_id -0.004 ***
## (0.001)
## as.factor(id)9:year_month_id -0.001
## (0.001)
## as.factor(id)10:year_month_id 0.006 ***
## (0.001)
## as.factor(id)11:year_month_id 0.001
## (0.002)
## as.factor(id)12:year_month_id 0.005 *
## (0.002)
## as.factor(id)13:year_month_id -0.002
## (0.002)
## as.factor(id)14:year_month_id 0.001
## (0.003)
## as.factor(id)15:year_month_id -0.001
## (0.001)
## as.factor(id)16:year_month_id 0.005 ***
## (0.001)
## as.factor(id)17:year_month_id -0.003 **
## (0.001)
## as.factor(id)18:year_month_id -0.004 ***
## (0.001)
## as.factor(id)19:year_month_id -0.008 ***
## (0.001)
## as.factor(id)20:year_month_id -0.004 ***
## (0.001)
## as.factor(id)21:year_month_id 0.003 ***
## (0.001)
## as.factor(id)22:year_month_id 0.004 ***
## (0.001)
## as.factor(id)23:year_month_id 0.002 *
## (0.001)
## as.factor(id)24:year_month_id -0.004 ***
## (0.001)
## as.factor(id)25:year_month_id 0.011 ***
## (0.001)
## as.factor(id)26:year_month_id -0.002
## (0.002)
## as.factor(id)27:year_month_id 0.005 *
## (0.002)
## as.factor(id)28:year_month_id -0.003
## (0.002)
## as.factor(id)29:year_month_id 0.003
## (0.002)
## as.factor(id)30:year_month_id -0.001
## (0.002)
## as.factor(id)31:year_month_id -0.010 ***
## (0.001)
## as.factor(id)32:year_month_id
##
## as.factor(id)33:year_month_id -0.004 ***
## (0.001)
## as.factor(id)34:year_month_id 0.001
## (0.001)
## as.factor(id)35:year_month_id 0.003 **
## (0.001)
## as.factor(id)36:year_month_id 0.001
## (0.001)
## as.factor(id)37:year_month_id 0.002
## (0.001)
## as.factor(id)38:year_month_id -0.000
## (0.001)
## as.factor(id)39:year_month_id -0.006 ***
## (0.001)
## as.factor(id)40:year_month_id 0.003
## (0.001)
## as.factor(id)41:year_month_id -0.013 ***
## (0.000)
## as.factor(id)42:year_month_id 0.013 ***
## (0.001)
## as.factor(id)43:year_month_id -0.001
## (0.001)
## as.factor(id)44:year_month_id 0.006 ***
## (0.001)
## as.factor(id)45:year_month_id 0.001
## (0.001)
## as.factor(id)46:year_month_id -0.003
## (0.002)
## as.factor(id)47:year_month_id -0.001
## (0.003)
## -------------------------------------------
## R^2 0.247
## Adj. R^2 0.176
## Num. obs. 1551
## RMSE 12.611
## N Clusters 47
## ===========================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "female_WLS_trend")
# Event study graph
graph_female_WLS_trend_onlypost <- event_study_graph(data = df_estimates ,
graph_title = "female_WLS_trend")
ggplotly(graph_female_WLS_trend_onlypost)
estimates_female_WLS_trend_onlypost <- df_estimates #for robustness check
results_female_WLS_trend_onlypost <- estimation_results # for only-post DID table
Y=female suicide rate/女性の自殺率 with covar
OLS, no trends
# DID estimation
estimation_results <- dynamic_DID_OLS_notrend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate_female,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "female_OLS_notrend")
# Event study graph
graph_female_OLS_notrend_covar <- event_study_graph(data = df_estimates,
graph_title = "female_OLS_notrend")
graph_female_OLS_notrend_covar
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_female_OLS_notrend_covar <- df_estimates #for robustness check
WLS, no trends
# DID estimation
estimation_results <- dynamic_DID_WLS_notrend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate_female,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "female_WLS_notrend")
# Event study graph
graph_female_WLS_notrend_covar <- event_study_graph(data = df_estimates,
graph_title = "female_WLS_notrend")
graph_female_WLS_notrend_covar
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_female_WLS_notrend_covar <- df_estimates #for robustness check
OLS, with trends
# DID estimation
estimation_results <- dynamic_DID_OLS_trend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate_female,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "female_OLS_trend")
# Event study graph
graph_female_OLS_trend_covar <- event_study_graph(data = df_estimates,
graph_title = "female_OLS_trend")
graph_female_OLS_trend_covar
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_female_OLS_trend_covar <- df_estimates #for robustness check
WLS, with trends, post-covid-month dummies, Table C.2 (4)
# DID estimation
estimation_results <- dynamic_onlypost_DID_WLS_trend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate_female,
treat_var = df_analysis$unemploy_shock_diff2)
texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
## 1 coefficient not defined because the design matrix is rank deficient
##
## ====================================================================
## Model 1
## --------------------------------------------------------------------
## treat_var:date_2020_02 -0.126
## (0.142)
## treat_var:date_2020_03 -0.104
## (0.138)
## treat_var:date_2020_04 -0.039
## (0.140)
## treat_var:date_2020_05 0.015
## (0.118)
## treat_var:date_2020_06 0.011
## (0.118)
## treat_var:date_2020_07 0.449 **
## (0.138)
## treat_var:date_2020_08 -0.291
## (0.177)
## treat_var:date_2020_09 0.023
## (0.131)
## date_2020_02:google_mobility_index_2020may -0.008
## (0.024)
## date_2020_03:google_mobility_index_2020may -0.029
## (0.024)
## date_2020_04:google_mobility_index_2020may -0.030
## (0.032)
## date_2020_05:google_mobility_index_2020may -0.055
## (0.030)
## date_2020_06:google_mobility_index_2020may 0.012
## (0.021)
## date_2020_07:google_mobility_index_2020may -0.061 *
## (0.023)
## date_2020_08:google_mobility_index_2020may 0.005
## (0.033)
## date_2020_09:google_mobility_index_2020may -0.013
## (0.026)
## date_2020_02:infection_rate_cumulative2020jun -0.028
## (0.018)
## date_2020_03:infection_rate_cumulative2020jun -0.025
## (0.017)
## date_2020_04:infection_rate_cumulative2020jun -0.036 *
## (0.015)
## date_2020_05:infection_rate_cumulative2020jun -0.015
## (0.015)
## date_2020_06:infection_rate_cumulative2020jun -0.004
## (0.014)
## date_2020_07:infection_rate_cumulative2020jun -0.031
## (0.021)
## date_2020_08:infection_rate_cumulative2020jun 0.011
## (0.021)
## date_2020_09:infection_rate_cumulative2020jun 0.011
## (0.016)
## date_2020_02:death_rate_cumulative2020jun 0.256
## (0.197)
## date_2020_03:death_rate_cumulative2020jun 0.121
## (0.198)
## date_2020_04:death_rate_cumulative2020jun 0.417 *
## (0.170)
## date_2020_05:death_rate_cumulative2020jun -0.020
## (0.161)
## date_2020_06:death_rate_cumulative2020jun 0.229
## (0.154)
## date_2020_07:death_rate_cumulative2020jun 0.363
## (0.237)
## date_2020_08:death_rate_cumulative2020jun -0.155
## (0.234)
## date_2020_09:death_rate_cumulative2020jun -0.154
## (0.186)
## date_2020_02:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_03:Population_per_1_km_2_of_inhabitable_area -0.000
## (0.000)
## date_2020_04:Population_per_1_km_2_of_inhabitable_area -0.000
## (0.000)
## date_2020_05:Population_per_1_km_2_of_inhabitable_area -0.000
## (0.000)
## date_2020_06:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_07:Population_per_1_km_2_of_inhabitable_area -0.000
## (0.000)
## date_2020_08:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_09:Population_per_1_km_2_of_inhabitable_area -0.000 *
## (0.000)
## date_2020_02:Secondary_industry_ratio 0.294
## (1.799)
## date_2020_03:Secondary_industry_ratio -1.998
## (1.824)
## date_2020_04:Secondary_industry_ratio 1.114
## (2.146)
## date_2020_05:Secondary_industry_ratio 1.033
## (2.068)
## date_2020_06:Secondary_industry_ratio 2.066
## (1.864)
## date_2020_07:Secondary_industry_ratio -3.255
## (2.088)
## date_2020_08:Secondary_industry_ratio 3.769
## (2.288)
## date_2020_09:Secondary_industry_ratio 0.989
## (2.104)
## date_2020_02:Tertiary_industry_ratio 1.121
## (2.787)
## date_2020_03:Tertiary_industry_ratio -2.025
## (2.082)
## date_2020_04:Tertiary_industry_ratio 1.653
## (2.743)
## date_2020_05:Tertiary_industry_ratio 0.753
## (2.216)
## date_2020_06:Tertiary_industry_ratio 2.391
## (1.846)
## date_2020_07:Tertiary_industry_ratio -6.519 *
## (2.972)
## date_2020_08:Tertiary_industry_ratio 6.189
## (3.487)
## date_2020_09:Tertiary_industry_ratio 0.006
## (2.419)
## date_2020_02:Total_population 0.000
## (0.000)
## date_2020_03:Total_population 0.000
## (0.000)
## date_2020_04:Total_population 0.000
## (0.000)
## date_2020_05:Total_population 0.001 ***
## (0.000)
## date_2020_06:Total_population 0.000
## (0.000)
## date_2020_07:Total_population 0.000
## (0.000)
## date_2020_08:Total_population 0.000
## (0.000)
## date_2020_09:Total_population 0.001 *
## (0.000)
## date_2020_02:Ratio_of_aged_population 0.007
## (0.011)
## date_2020_03:Ratio_of_aged_population 0.015
## (0.013)
## date_2020_04:Ratio_of_aged_population 0.010
## (0.014)
## date_2020_05:Ratio_of_aged_population 0.048 **
## (0.015)
## date_2020_06:Ratio_of_aged_population 0.012
## (0.010)
## date_2020_07:Ratio_of_aged_population 0.021
## (0.012)
## date_2020_08:Ratio_of_aged_population -0.001
## (0.015)
## date_2020_09:Ratio_of_aged_population 0.028
## (0.014)
## as.factor(id)1:year_month_id 0.011 ***
## (0.003)
## as.factor(id)2:year_month_id 0.011 ***
## (0.001)
## as.factor(id)3:year_month_id 0.014 ***
## (0.001)
## as.factor(id)4:year_month_id 0.017 ***
## (0.002)
## as.factor(id)5:year_month_id 0.005 *
## (0.002)
## as.factor(id)6:year_month_id 0.015 ***
## (0.002)
## as.factor(id)7:year_month_id 0.011 ***
## (0.002)
## as.factor(id)8:year_month_id 0.002
## (0.002)
## as.factor(id)9:year_month_id 0.009 ***
## (0.002)
## as.factor(id)10:year_month_id 0.011 ***
## (0.003)
## as.factor(id)11:year_month_id 0.007 ***
## (0.002)
## as.factor(id)12:year_month_id 0.009 **
## (0.003)
## as.factor(id)13:year_month_id 0.005 **
## (0.002)
## as.factor(id)14:year_month_id 0.007 **
## (0.002)
## as.factor(id)15:year_month_id 0.005 *
## (0.002)
## as.factor(id)16:year_month_id 0.010 *
## (0.005)
## as.factor(id)17:year_month_id 0.004
## (0.004)
## as.factor(id)18:year_month_id 0.006
## (0.003)
## as.factor(id)19:year_month_id 0.001
## (0.003)
## as.factor(id)20:year_month_id -0.000
## (0.003)
## as.factor(id)21:year_month_id 0.009 ***
## (0.003)
## as.factor(id)22:year_month_id 0.007 **
## (0.003)
## as.factor(id)23:year_month_id 0.007 **
## (0.002)
## as.factor(id)24:year_month_id 0.002
## (0.002)
## as.factor(id)25:year_month_id 0.024 ***
## (0.002)
## as.factor(id)26:year_month_id 0.006 **
## (0.002)
## as.factor(id)27:year_month_id 0.012 ***
## (0.002)
## as.factor(id)28:year_month_id 0.001
## (0.003)
## as.factor(id)29:year_month_id 0.013 ***
## (0.003)
## as.factor(id)30:year_month_id 0.008 ***
## (0.002)
## as.factor(id)31:year_month_id
##
## as.factor(id)32:year_month_id 0.004
## (0.002)
## as.factor(id)33:year_month_id 0.004 **
## (0.001)
## as.factor(id)34:year_month_id 0.007 ***
## (0.002)
## as.factor(id)35:year_month_id 0.007 *
## (0.003)
## as.factor(id)36:year_month_id 0.006 ***
## (0.002)
## as.factor(id)37:year_month_id 0.008 ***
## (0.002)
## as.factor(id)38:year_month_id 0.007 ***
## (0.001)
## as.factor(id)39:year_month_id -0.001
## (0.002)
## as.factor(id)40:year_month_id 0.010 ***
## (0.002)
## as.factor(id)41:year_month_id -0.003 *
## (0.001)
## as.factor(id)42:year_month_id 0.019 ***
## (0.001)
## as.factor(id)43:year_month_id 0.006 ***
## (0.001)
## as.factor(id)44:year_month_id 0.014 ***
## (0.001)
## as.factor(id)45:year_month_id 0.010 ***
## (0.001)
## as.factor(id)46:year_month_id 0.004 ***
## (0.001)
## as.factor(id)47:year_month_id 0.014 ***
## (0.003)
## --------------------------------------------------------------------
## R^2 0.287
## Adj. R^2 0.184
## Num. obs. 1551
## RMSE 12.557
## N Clusters 47
## ====================================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "female_WLS_trend")
# Event study graph
graph_female_WLS_trend_covar_onlypost <- event_study_graph(data = df_estimates ,
graph_title = "female_WLS_trend")
ggplotly(graph_female_WLS_trend_covar_onlypost)
estimates_female_WLS_trend_covar_onlypost <- df_estimates #for robustness check
results_female_WLS_trend_covar_onlypost <- estimation_results # for only-post DID table
Y=female suicide rate(YOY)/女性合計の自殺率(前年同月差)
OLS, no trends
# DID estimation
estimation_results <- dynamic_DID_OLS_notrend(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate_female,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_female_OLS_notrend")
# Event study graph
graph_yoy_female_OLS_notrend <- event_study_graph(data = df_estimates,
graph_title = "yoy_female_OLS_notrend")
graph_yoy_female_OLS_notrend
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_yoy_female_OLS_notrend <- df_estimates #for robustness check
WLS, no trends
# DID estimation
estimation_results <- dynamic_DID_WLS_notrend(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate_female,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_female_WLS_notrend")
# Event study graph
graph_yoy_female_WLS_notrend <- event_study_graph(data = df_estimates,
graph_title = "yoy_female_WLS_notrend")
graph_yoy_female_WLS_notrend
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_yoy_female_WLS_notrend <- df_estimates #for robustness check
OLS, with trends
# DID estimation
estimation_results <- dynamic_DID_OLS_trend(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate_female,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_female_OLS_trend")
# Event study graph
graph_yoy_female_OLS_trend <- event_study_graph(data = df_estimates,
graph_title = "yoy_female_OLS_trend")
graph_yoy_female_OLS_trend
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_yoy_female_OLS_trend <- df_estimates #for robustness check
WLS, with trends
# DID estimation
estimation_results <- dynamic_DID_WLS_trend(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate_female,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_female_WLS_trend")
# Event study graph
graph_yoy_female_WLS_trend <- event_study_graph(data = df_estimates,
graph_title = "yoy_female_WLS_trend")
ggplotly(graph_yoy_female_WLS_trend)
estimates_yoy_female_WLS_trend <- df_estimates #for robustness check
Y=female suicide rate(YOY)/女性合計の自殺率(前年同月差)with covar
OLS, no trends
# DID estimation
estimation_results <- dynamic_DID_OLS_notrend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate_female,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_female_OLS_notrend")
# Event study graph
graph_yoy_female_OLS_notrend_covar <- event_study_graph(data = df_estimates,
graph_title = "yoy_female_OLS_notrend")
graph_yoy_female_OLS_notrend_covar
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_yoy_female_OLS_notrend_covar <- df_estimates #for robustness check
WLS, no trends
# DID estimation
estimation_results <- dynamic_DID_WLS_notrend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate_female,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_female_WLS_notrend")
# Event study graph
graph_yoy_female_WLS_notrend_covar <- event_study_graph(data = df_estimates,
graph_title = "yoy_female_WLS_notrend")
graph_yoy_female_WLS_notrend_covar
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_yoy_female_WLS_notrend_covar <- df_estimates #for robustness check
OLS, with trends
# DID estimation
estimation_results <- dynamic_DID_OLS_trend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate_female,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_female_OLS_trend")
# Event study graph
graph_yoy_female_OLS_trend_covar <- event_study_graph(data = df_estimates,
graph_title = "yoy_female_OLS_trend")
graph_yoy_female_OLS_trend_covar
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_yoy_female_OLS_trend_covar <- df_estimates #for robustness check
WLS, with trends
# DID estimation
estimation_results <- dynamic_DID_WLS_trend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate_female,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_female_WLS_trend")
# Event study graph
graph_yoy_female_WLS_trend_covar <- event_study_graph(data = df_estimates,
graph_title = "yoy_female_WLS_trend")
ggplotly(graph_yoy_female_WLS_trend_covar)
estimates_yoy_female_WLS_trend_covar <- df_estimates #for robustness check
Y=male suicide rate/男性の自殺率
OLS, no trends
# DID estimation
estimation_results <- dynamic_DID_OLS_notrend(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate_male,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "male_OLS_notrend")
# Event study graph
graph_male_OLS_notrend <- event_study_graph(data = df_estimates,
graph_title = "male_OLS_notrend")
graph_male_OLS_notrend
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_male_OLS_notrend <- df_estimates #for robustness check
WLS, no trends
# DID estimation
estimation_results <- dynamic_DID_WLS_notrend(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate_male,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "male_WLS_notrend")
# Event study graph
graph_male_WLS_notrend <- event_study_graph(data = df_estimates,
graph_title = "male_WLS_notrend")
graph_male_WLS_notrend
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_male_WLS_notrend <- df_estimates #for robustness check
OLS, with trends
# DID estimation
estimation_results <- dynamic_DID_OLS_trend(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate_male,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "male_OLS_trend")
# Event study graph
graph_male_OLS_trend <- event_study_graph(data = df_estimates ,
graph_title = "male_OLS_trend")
graph_male_OLS_trend
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_male_OLS_trend <- df_estimates #for robustness check
WLS, with trends, post-covid-month dummies, Table C.1 (6)
# DID estimation
estimation_results <- dynamic_onlypost_DID_WLS_trend(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate_male,
treat_var = df_analysis$unemploy_shock_diff2)
texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
## 1 coefficient not defined because the design matrix is rank deficient
##
## ===========================================
## Model 1
## -------------------------------------------
## treat_var:date_2020_02 -0.038
## (0.123)
## treat_var:date_2020_03 -0.037
## (0.165)
## treat_var:date_2020_04 0.043
## (0.118)
## treat_var:date_2020_05 0.198
## (0.176)
## treat_var:date_2020_06 0.474 ***
## (0.134)
## treat_var:date_2020_07 0.396 *
## (0.152)
## treat_var:date_2020_08 0.090
## (0.193)
## treat_var:date_2020_09 0.024
## (0.155)
## as.factor(id)1:year_month_id -0.031 ***
## (0.005)
## as.factor(id)2:year_month_id -0.031 ***
## (0.003)
## as.factor(id)3:year_month_id -0.024 ***
## (0.003)
## as.factor(id)4:year_month_id -0.027 ***
## (0.004)
## as.factor(id)5:year_month_id -0.017 ***
## (0.003)
## as.factor(id)6:year_month_id -0.032 ***
## (0.003)
## as.factor(id)7:year_month_id -0.030 ***
## (0.003)
## as.factor(id)8:year_month_id -0.029 ***
## (0.002)
## as.factor(id)9:year_month_id -0.025 ***
## (0.002)
## as.factor(id)10:year_month_id -0.022 ***
## (0.001)
## as.factor(id)11:year_month_id -0.032 ***
## (0.004)
## as.factor(id)12:year_month_id -0.034 ***
## (0.004)
## as.factor(id)13:year_month_id -0.039 ***
## (0.004)
## as.factor(id)14:year_month_id -0.028 ***
## (0.006)
## as.factor(id)15:year_month_id -0.033 ***
## (0.003)
## as.factor(id)16:year_month_id -0.011 ***
## (0.003)
## as.factor(id)17:year_month_id -0.005 *
## (0.002)
## as.factor(id)18:year_month_id -0.005 **
## (0.002)
## as.factor(id)19:year_month_id -0.020 ***
## (0.002)
## as.factor(id)20:year_month_id -0.019 ***
## (0.002)
## as.factor(id)21:year_month_id -0.025 ***
## (0.002)
## as.factor(id)22:year_month_id -0.024 ***
## (0.002)
## as.factor(id)23:year_month_id -0.022 ***
## (0.002)
## as.factor(id)24:year_month_id -0.023 ***
## (0.002)
## as.factor(id)25:year_month_id -0.033 ***
## (0.002)
## as.factor(id)26:year_month_id -0.022 ***
## (0.004)
## as.factor(id)27:year_month_id -0.017 **
## (0.005)
## as.factor(id)28:year_month_id -0.032 ***
## (0.004)
## as.factor(id)29:year_month_id -0.036 ***
## (0.005)
## as.factor(id)30:year_month_id -0.042 ***
## (0.005)
## as.factor(id)31:year_month_id -0.022 ***
## (0.003)
## as.factor(id)32:year_month_id
##
## as.factor(id)33:year_month_id -0.023 ***
## (0.002)
## as.factor(id)34:year_month_id -0.028 ***
## (0.002)
## as.factor(id)35:year_month_id -0.025 ***
## (0.003)
## as.factor(id)36:year_month_id -0.021 ***
## (0.003)
## as.factor(id)37:year_month_id -0.032 ***
## (0.003)
## as.factor(id)38:year_month_id -0.029 ***
## (0.003)
## as.factor(id)39:year_month_id -0.011 ***
## (0.002)
## as.factor(id)40:year_month_id -0.027 ***
## (0.003)
## as.factor(id)41:year_month_id -0.046 ***
## (0.001)
## as.factor(id)42:year_month_id -0.010 ***
## (0.002)
## as.factor(id)43:year_month_id -0.006 **
## (0.002)
## as.factor(id)44:year_month_id -0.046 ***
## (0.003)
## as.factor(id)45:year_month_id -0.019 ***
## (0.002)
## as.factor(id)46:year_month_id -0.011 **
## (0.004)
## as.factor(id)47:year_month_id -0.022 ***
## (0.006)
## -------------------------------------------
## R^2 0.429
## Adj. R^2 0.376
## Num. obs. 1551
## RMSE 20.677
## N Clusters 47
## ===========================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "male_WLS_trend")
# Event study graph
graph_male_WLS_trend_onlypost <- event_study_graph(data = df_estimates ,
graph_title = "male_WLS_trend")
ggplotly(graph_male_WLS_trend_onlypost)
estimates_male_WLS_trend_onlypost <- df_estimates #for robustness check
results_male_WLS_trend_onlypost <- estimation_results # for only-post DID table
Y=male suicide rate/男性の自殺率 with covar
OLS, no trends
# DID estimation
estimation_results <- dynamic_DID_OLS_notrend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate_male,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "male_OLS_notrend")
# Event study graph
graph_male_OLS_notrend_covar <- event_study_graph(data = df_estimates,
graph_title = "male_OLS_notrend")
graph_male_OLS_notrend_covar
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_male_OLS_notrend_covar <- df_estimates #for robustness check
WLS, no trends
# DID estimation
estimation_results <- dynamic_DID_WLS_notrend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate_male,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "male_WLS_notrend")
# Event study graph
graph_male_WLS_notrend_covar <- event_study_graph(data = df_estimates,
graph_title = "male_WLS_notrend")
graph_male_WLS_notrend_covar
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_male_WLS_notrend_covar <- df_estimates #for robustness check
OLS, with trends
# DID estimation
estimation_results <- dynamic_DID_OLS_trend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate_male,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "male_OLS_trend")
# Event study graph
graph_male_OLS_trend_covar <- event_study_graph(data = df_estimates ,
graph_title = "male_OLS_trend")
graph_male_OLS_trend_covar
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_male_OLS_trend_covar <- df_estimates #for robustness check
WLS, with trends, post-covid-month dummies,Table C.2 (6)
# DID estimation
estimation_results <- dynamic_onlypost_DID_WLS_trend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$suicide_rate_male,
treat_var = df_analysis$unemploy_shock_diff2)
texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
## 1 coefficient not defined because the design matrix is rank deficient
##
## ====================================================================
## Model 1
## --------------------------------------------------------------------
## treat_var:date_2020_02 -0.478
## (0.238)
## treat_var:date_2020_03 -0.130
## (0.289)
## treat_var:date_2020_04 0.008
## (0.204)
## treat_var:date_2020_05 0.140
## (0.308)
## treat_var:date_2020_06 0.157
## (0.267)
## treat_var:date_2020_07 0.344
## (0.249)
## treat_var:date_2020_08 -0.248
## (0.317)
## treat_var:date_2020_09 -0.147
## (0.277)
## date_2020_02:google_mobility_index_2020may 0.018
## (0.041)
## date_2020_03:google_mobility_index_2020may 0.052
## (0.050)
## date_2020_04:google_mobility_index_2020may 0.059
## (0.040)
## date_2020_05:google_mobility_index_2020may -0.012
## (0.051)
## date_2020_06:google_mobility_index_2020may 0.052
## (0.032)
## date_2020_07:google_mobility_index_2020may 0.051
## (0.051)
## date_2020_08:google_mobility_index_2020may 0.119 *
## (0.058)
## date_2020_09:google_mobility_index_2020may 0.041
## (0.054)
## date_2020_02:infection_rate_cumulative2020jun -0.011
## (0.023)
## date_2020_03:infection_rate_cumulative2020jun 0.018
## (0.035)
## date_2020_04:infection_rate_cumulative2020jun -0.005
## (0.024)
## date_2020_05:infection_rate_cumulative2020jun -0.035
## (0.037)
## date_2020_06:infection_rate_cumulative2020jun 0.031
## (0.025)
## date_2020_07:infection_rate_cumulative2020jun 0.041
## (0.024)
## date_2020_08:infection_rate_cumulative2020jun 0.004
## (0.037)
## date_2020_09:infection_rate_cumulative2020jun 0.021
## (0.030)
## date_2020_02:death_rate_cumulative2020jun -0.005
## (0.227)
## date_2020_03:death_rate_cumulative2020jun -0.080
## (0.371)
## date_2020_04:death_rate_cumulative2020jun 0.144
## (0.267)
## date_2020_05:death_rate_cumulative2020jun 0.295
## (0.464)
## date_2020_06:death_rate_cumulative2020jun -0.152
## (0.290)
## date_2020_07:death_rate_cumulative2020jun -0.661 *
## (0.293)
## date_2020_08:death_rate_cumulative2020jun 0.103
## (0.472)
## date_2020_09:death_rate_cumulative2020jun -0.216
## (0.335)
## date_2020_02:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_03:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_04:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_05:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_06:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_07:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_08:Population_per_1_km_2_of_inhabitable_area 0.000 *
## (0.000)
## date_2020_09:Population_per_1_km_2_of_inhabitable_area 0.000
## (0.000)
## date_2020_02:Secondary_industry_ratio -3.177
## (3.253)
## date_2020_03:Secondary_industry_ratio 2.228
## (4.419)
## date_2020_04:Secondary_industry_ratio -0.003
## (3.080)
## date_2020_05:Secondary_industry_ratio -0.450
## (3.713)
## date_2020_06:Secondary_industry_ratio 4.177
## (2.465)
## date_2020_07:Secondary_industry_ratio -4.423
## (2.983)
## date_2020_08:Secondary_industry_ratio -0.176
## (2.839)
## date_2020_09:Secondary_industry_ratio -0.577
## (2.959)
## date_2020_02:Tertiary_industry_ratio 0.041
## (4.126)
## date_2020_03:Tertiary_industry_ratio 3.650
## (5.170)
## date_2020_04:Tertiary_industry_ratio 2.502
## (3.100)
## date_2020_05:Tertiary_industry_ratio -2.470
## (5.547)
## date_2020_06:Tertiary_industry_ratio 5.608
## (3.249)
## date_2020_07:Tertiary_industry_ratio -5.196
## (4.060)
## date_2020_08:Tertiary_industry_ratio 3.092
## (4.406)
## date_2020_09:Tertiary_industry_ratio 0.949
## (3.835)
## date_2020_02:Total_population 0.000
## (0.001)
## date_2020_03:Total_population -0.000
## (0.001)
## date_2020_04:Total_population -0.000
## (0.001)
## date_2020_05:Total_population 0.000
## (0.001)
## date_2020_06:Total_population 0.000
## (0.000)
## date_2020_07:Total_population -0.000
## (0.001)
## date_2020_08:Total_population -0.000
## (0.001)
## date_2020_09:Total_population 0.000
## (0.001)
## date_2020_02:Ratio_of_aged_population -0.021
## (0.027)
## date_2020_03:Ratio_of_aged_population -0.015
## (0.030)
## date_2020_04:Ratio_of_aged_population -0.008
## (0.023)
## date_2020_05:Ratio_of_aged_population 0.023
## (0.024)
## date_2020_06:Ratio_of_aged_population -0.013
## (0.017)
## date_2020_07:Ratio_of_aged_population -0.004
## (0.025)
## date_2020_08:Ratio_of_aged_population -0.039
## (0.026)
## date_2020_09:Ratio_of_aged_population -0.015
## (0.028)
## as.factor(id)1:year_month_id 0.001
## (0.006)
## as.factor(id)2:year_month_id -0.014 ***
## (0.003)
## as.factor(id)3:year_month_id -0.003
## (0.002)
## as.factor(id)4:year_month_id 0.000
## (0.004)
## as.factor(id)5:year_month_id 0.005
## (0.005)
## as.factor(id)6:year_month_id -0.007
## (0.007)
## as.factor(id)7:year_month_id -0.002
## (0.006)
## as.factor(id)8:year_month_id -0.001
## (0.004)
## as.factor(id)9:year_month_id 0.003
## (0.005)
## as.factor(id)10:year_month_id 0.007
## (0.006)
## as.factor(id)11:year_month_id -0.005
## (0.005)
## as.factor(id)12:year_month_id -0.003
## (0.007)
## as.factor(id)13:year_month_id -0.018 ***
## (0.005)
## as.factor(id)14:year_month_id -0.002
## (0.005)
## as.factor(id)15:year_month_id -0.008
## (0.005)
## as.factor(id)16:year_month_id 0.021 **
## (0.007)
## as.factor(id)17:year_month_id 0.026 ***
## (0.007)
## as.factor(id)18:year_month_id 0.015 **
## (0.005)
## as.factor(id)19:year_month_id 0.011
## (0.007)
## as.factor(id)20:year_month_id 0.011
## (0.007)
## as.factor(id)21:year_month_id 0.003
## (0.006)
## as.factor(id)22:year_month_id 0.005
## (0.007)
## as.factor(id)23:year_month_id 0.002
## (0.005)
## as.factor(id)24:year_month_id 0.006
## (0.005)
## as.factor(id)25:year_month_id -0.008
## (0.006)
## as.factor(id)26:year_month_id 0.011
## (0.006)
## as.factor(id)27:year_month_id 0.006
## (0.005)
## as.factor(id)28:year_month_id -0.003
## (0.005)
## as.factor(id)29:year_month_id -0.009
## (0.004)
## as.factor(id)30:year_month_id -0.013 **
## (0.005)
## as.factor(id)31:year_month_id
##
## as.factor(id)32:year_month_id 0.020 *
## (0.008)
## as.factor(id)33:year_month_id 0.003
## (0.003)
## as.factor(id)34:year_month_id -0.002
## (0.005)
## as.factor(id)35:year_month_id 0.002
## (0.006)
## as.factor(id)36:year_month_id 0.008
## (0.004)
## as.factor(id)37:year_month_id -0.003
## (0.005)
## as.factor(id)38:year_month_id -0.004
## (0.003)
## as.factor(id)39:year_month_id 0.014 **
## (0.004)
## as.factor(id)40:year_month_id -0.002
## (0.005)
## as.factor(id)41:year_month_id -0.026 ***
## (0.003)
## as.factor(id)42:year_month_id 0.012 *
## (0.005)
## as.factor(id)43:year_month_id 0.017 ***
## (0.003)
## as.factor(id)44:year_month_id -0.021 ***
## (0.003)
## as.factor(id)45:year_month_id 0.002
## (0.002)
## as.factor(id)46:year_month_id 0.013 ***
## (0.002)
## as.factor(id)47:year_month_id 0.014
## (0.010)
## --------------------------------------------------------------------
## R^2 0.451
## Adj. R^2 0.371
## Num. obs. 1551
## RMSE 20.751
## N Clusters 47
## ====================================================================
## *** p < 0.001; ** p < 0.01; * p < 0.05
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "male_WLS_trend")
# Event study graph
graph_male_WLS_trend_covar_onlypost <- event_study_graph(data = df_estimates ,
graph_title = "male_WLS_trend")
ggplotly(graph_male_WLS_trend_covar_onlypost)
estimates_male_WLS_trend_covar_onlypost <- df_estimates #for robustness check
results_male_WLS_trend_covar_onlypost <- estimation_results # for only-post DID table
Y=male suicide rate(YOY)/男性計の自殺率(前年同月差)
OLS, no trends
# DID estimation
estimation_results <- dynamic_DID_OLS_notrend(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate_male,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_male_OLS_notrend")
# Event study graph
graph_yoy_male_OLS_notrend <- event_study_graph(data = df_estimates,
graph_title = "yoy_male_OLS_notrend")
graph_yoy_male_OLS_notrend
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_yoy_male_OLS_notrend <- df_estimates #for robustness check
WLS, no trends
# DID estimation
estimation_results <- dynamic_DID_WLS_notrend(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate_male,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_male_WLS_notrend")
# Event study graph
graph_yoy_male_WLS_notrend <- event_study_graph(data = df_estimates,
graph_title = "yoy_male_WLS_notrend")
graph_yoy_male_WLS_notrend
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_yoy_male_WLS_notrend <- df_estimates #for robustness check
OLS, with trends
# DID estimation
estimation_results <- dynamic_DID_OLS_trend(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate_male,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_male_OLS_trend")
# Event study graph
graph_yoy_male_OLS_trend <- event_study_graph(data = df_estimates,
graph_title = "yoy_male_OLS_trend")
graph_yoy_male_OLS_trend
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_yoy_male_OLS_trend <- df_estimates #for robustness check
WLS, with trends
# DID estimation
estimation_results <- dynamic_DID_WLS_trend(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate_male,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_male_WLS_trend")
# Event study graph
graph_yoy_male_WLS_trend <- event_study_graph(data = df_estimates,
graph_title = "yoy_male_WLS_trend")
ggplotly(graph_yoy_male_WLS_trend)
estimates_yoy_male_WLS_trend <- df_estimates #for robustness check
Y=male suicide rate(YOY)/男性計の自殺率(前年同月差)with covar
OLS, no trends
# DID estimation
estimation_results <- dynamic_DID_OLS_notrend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate_male,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_male_OLS_notrend")
# Event study graph
graph_yoy_male_OLS_notrend_covar <- event_study_graph(data = df_estimates,
graph_title = "yoy_male_OLS_notrend")
graph_yoy_male_OLS_notrend_covar
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_yoy_male_OLS_notrend_covar <- df_estimates #for robustness check
WLS, no trends
# DID estimation
estimation_results <- dynamic_DID_WLS_notrend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate_male,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_male_WLS_notrend")
# Event study graph
graph_yoy_male_WLS_notrend_covar <- event_study_graph(data = df_estimates,
graph_title = "yoy_male_WLS_notrend")
graph_yoy_male_WLS_notrend_covar
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_yoy_male_WLS_notrend_covar <- df_estimates #for robustness check
OLS, with trends
# DID estimation
estimation_results <- dynamic_DID_OLS_trend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate_male,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_male_OLS_trend")
# Event study graph
graph_yoy_male_OLS_trend_covar <- event_study_graph(data = df_estimates,
graph_title = "yoy_male_OLS_trend")
graph_yoy_male_OLS_trend_covar
## Warning: Removed 32 rows containing missing values (geom_point).
## Warning: Removed 32 row(s) containing missing values (geom_path).

estimates_yoy_male_OLS_trend_covar <- df_estimates #for robustness check
WLS, with trends
# DID estimation
estimation_results <- dynamic_DID_WLS_trend_covar8Xcovid_months(dataset = df_analysis,
outcome_var = df_analysis$yoy_suicide_rate_male,
treat_var = df_analysis$unemploy_shock_diff2)
#texreg::screenreg(l = estimation_results , include.ci = FALSE, digits=3)
# DID estimates and 90% CI
df_estimates <- DID_coefficients_main(DID_results = estimation_results,
treat_var = "unemploy_shock_diff2",
estimation_label = "yoy_male_WLS_trend")
# Event study graph
graph_yoy_male_WLS_trend_covar <- event_study_graph(data = df_estimates,
graph_title = "yoy_male_WLS_trend")
ggplotly(graph_yoy_male_WLS_trend_covar)
estimates_yoy_male_WLS_trend_covar <- df_estimates #for robustness check
GGplotly
ggplotly(graph_total_WLS_trend)
ggplotly(graph_total_WLS_trend_covar)
ggplotly(graph_female_WLS_trend)
ggplotly(graph_female_WLS_trend_covar)
ggplotly(graph_male_WLS_trend)
ggplotly(graph_male_WLS_trend_covar)
Merge outcome results/アウトカム結果の結合
Y=total suicide rate/男女合計の自殺率
#merge and label estimates data
estimates_total_bind <- dplyr::bind_rows(estimates_total_OLS_notrend,
estimates_total_WLS_notrend,
estimates_total_OLS_trend,
estimates_total_WLS_trend)
#change labels and reorder labels
estimates_total_bind <- estimates_labeling_main(estimates_total_bind)
# Display results
DT::datatable(estimates_total_bind) %>%
DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_total_bind <- event_study_graph_bind_main(data = estimates_total_bind,
graph_title = "(a) Total suicide rate")
ggplotly(graph_total_bind)
#ggplotly(graph_total_bind)
Y=total suicide rate/男女合計の自殺率 with covar
#merge and label estimates data
estimates_total_bind <- dplyr::bind_rows(estimates_total_OLS_notrend_covar,
estimates_total_WLS_notrend_covar,
estimates_total_OLS_trend_covar,
estimates_total_WLS_trend_covar)
#change labels and reorder labels
estimates_total_bind <- estimates_labeling_main(estimates_total_bind)
# Display results
DT::datatable(estimates_total_bind) %>%
DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_total_bind_covar <- event_study_graph_bind_main(data = estimates_total_bind,
graph_title = "(a) Total suicide rate")
ggplotly(graph_total_bind_covar)
Y=total suicide rate(YOY)/男女合計の自殺率(対前年同期差)
#merge and label estimates data
estimates_yoy_total_bind <- dplyr::bind_rows(estimates_yoy_total_OLS_notrend,
estimates_yoy_total_WLS_notrend,
estimates_yoy_total_OLS_trend,
estimates_yoy_total_WLS_trend)
#change labels and reorder labels
estimates_yoy_total_bind <- estimates_labeling_main(estimates_yoy_total_bind)
# display results
DT::datatable(estimates_yoy_total_bind) %>%
DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_yoy_total_bind <- event_study_graph_bind_main(data = estimates_yoy_total_bind,
graph_title = "(b) Total suicide rate (year-on-year)")
ggplotly(graph_yoy_total_bind)
Y=total suicide rate(YOY)/男女合計の自殺率(対前年同期差) with covar
#merge and label estimates data
estimates_yoy_total_bind <- dplyr::bind_rows(estimates_yoy_total_OLS_notrend_covar,
estimates_yoy_total_WLS_notrend_covar,
estimates_yoy_total_OLS_trend_covar,
estimates_yoy_total_WLS_trend_covar)
#change labels and reorder labels
estimates_yoy_total_bind <- estimates_labeling_main(estimates_yoy_total_bind)
# display results
DT::datatable(estimates_yoy_total_bind) %>%
DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_yoy_total_bind_covar <- event_study_graph_bind_main(data = estimates_yoy_total_bind,
graph_title = "(b) Total suicide rate (year-on-year)")
ggplotly(graph_yoy_total_bind_covar)
Y=female suicide rate/女性の自殺率
#merge and label estimates data
estimates_female_bind <- dplyr::bind_rows(estimates_female_OLS_notrend,
estimates_female_WLS_notrend,
estimates_female_OLS_trend,
estimates_female_WLS_trend)
#change labels and reorder labels
estimates_female_bind <- estimates_labeling_main(estimates_female_bind)
# display results
DT::datatable(estimates_female_bind) %>%
DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_female_bind <- event_study_graph_bind_main(data = estimates_female_bind,
graph_title = "(c) Female suicide rate")
ggplotly(graph_female_bind)
Y=female suicide rate/女性の自殺率 with covar
#merge and label estimates data
estimates_female_bind <- dplyr::bind_rows(estimates_female_OLS_notrend_covar,
estimates_female_WLS_notrend_covar,
estimates_female_OLS_trend_covar,
estimates_female_WLS_trend_covar)
#change labels and reorder labels
estimates_female_bind <- estimates_labeling_main(estimates_female_bind)
# display results
DT::datatable(estimates_female_bind) %>%
DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_female_bind_covar <- event_study_graph_bind_main(data = estimates_female_bind,
graph_title = "(c) Female suicide rate")
ggplotly(graph_female_bind_covar)
Y=female suicide rate(YOY)/女性の自殺率(対前年同期差)
#merge and label estimates data
estimates_yoy_female_bind <- dplyr::bind_rows(estimates_yoy_female_OLS_notrend,
estimates_yoy_female_WLS_notrend,
estimates_yoy_female_OLS_trend,
estimates_yoy_female_WLS_trend)
#change labels and reorder labels
estimates_yoy_female_bind <- estimates_labeling_main(estimates_yoy_female_bind)
# display results
DT::datatable(estimates_yoy_female_bind) %>%
DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_yoy_female_bind <- event_study_graph_bind_main(data = estimates_yoy_female_bind,
graph_title = "(d) Female suicide rate (year-on-year)")
ggplotly(graph_yoy_female_bind)
Y=female suicide rate(YOY)/女性の自殺率(対前年同期差) with covar
#merge and label estimates data
estimates_yoy_female_bind <- dplyr::bind_rows(estimates_yoy_female_OLS_notrend_covar,
estimates_yoy_female_WLS_notrend_covar,
estimates_yoy_female_OLS_trend_covar,
estimates_yoy_female_WLS_trend_covar)
#change labels and reorder labels
estimates_yoy_female_bind <- estimates_labeling_main(estimates_yoy_female_bind)
# display results
DT::datatable(estimates_yoy_female_bind) %>%
DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_yoy_female_bind_covar <- event_study_graph_bind_main(data = estimates_yoy_female_bind,
graph_title = "(d) Female suicide rate (year-on-year)")
ggplotly(graph_yoy_female_bind_covar)
Y=male suicide rate/男性の自殺率
#merge and label estimates data
estimates_male_bind <- dplyr::bind_rows(estimates_male_OLS_notrend,
estimates_male_WLS_notrend,
estimates_male_OLS_trend,
estimates_male_WLS_trend)
#change labels and reorder labels
estimates_male_bind <- estimates_labeling_main(estimates_male_bind)
# display results
DT::datatable(estimates_male_bind) %>%
DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_male_bind <- event_study_graph_bind_main(data = estimates_male_bind,
graph_title = "(e) Male Suicide rate")
ggplotly(graph_male_bind)
Y=male suicide rate/男性の自殺率 with covar
#merge and label estimates data
estimates_male_bind <- dplyr::bind_rows(estimates_male_OLS_notrend_covar,
estimates_male_WLS_notrend_covar,
estimates_male_OLS_trend_covar,
estimates_male_WLS_trend_covar)
#change labels and reorder labels
estimates_male_bind <- estimates_labeling_main(estimates_male_bind)
# display results
DT::datatable(estimates_male_bind) %>%
DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_male_bind_covar <- event_study_graph_bind_main(data = estimates_male_bind,
graph_title = "(e) Male Suicide rate")
ggplotly(graph_male_bind_covar)
Y=male suicide rate(YOY)/男性の自殺率(対前年同期差)
#merge and label estimates data
estimates_yoy_male_bind <- dplyr::bind_rows(estimates_yoy_male_OLS_notrend,
estimates_yoy_male_WLS_notrend,
estimates_yoy_male_OLS_trend,
estimates_yoy_male_WLS_trend)
#change labels and reorder labels
estimates_yoy_male_bind <- estimates_labeling_main(estimates_yoy_male_bind)
# display results
DT::datatable(estimates_yoy_male_bind) %>%
DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_yoy_male_bind <- event_study_graph_bind_main(data = estimates_yoy_male_bind,
graph_title = "(f) Male Suicide rate (year-on-year)")
ggplotly(graph_yoy_male_bind)
Y=male suicide rate(YOY)/男性の自殺率(対前年同期差) with covar
#merge and label estimates data
estimates_yoy_male_bind <- dplyr::bind_rows(estimates_yoy_male_OLS_notrend_covar,
estimates_yoy_male_WLS_notrend_covar,
estimates_yoy_male_OLS_trend_covar,
estimates_yoy_male_WLS_trend_covar)
#change labels and reorder labels
estimates_yoy_male_bind <- estimates_labeling_main(estimates_yoy_male_bind)
# display results
DT::datatable(estimates_yoy_male_bind) %>%
DT::formatRound(columns = c("estimate", "ci_lower", "ci_upper"), digits=3)
#graph
graph_yoy_male_bind_covar <- event_study_graph_bind_main(data = estimates_yoy_male_bind,
graph_title = "(f) Male Suicide rate (year-on-year)")
ggplotly(graph_yoy_male_bind_covar)
Merge graphs/グラフ統合
Regression table/回帰結果表 without covar
options("modelsummary_format_numeric_latex" = "plain")
# 列の選択 column order
# 男女合計、女性、男性、YOYのみ, monthlyhのみ
rows_MONTH <- tribble(~name, ~"(1)", ~"(2)", ~"(3)", ~"(4)", ~"(5)", ~"(6)",
"Ref. month", "\\footnotesize{Jan.2020}", "\\footnotesize{$\\leq$Jan.2020}", "\\footnotesize{Jan.2020}", "\\footnotesize{$\\leq$Jan.2020}","\\footnotesize{Jan.2020}", "\\footnotesize{$\\leq$Jan.2020}")
## results list
table_results_MONTH <- list()
table_results_MONTH[["(1)"]] <- results_total_WLS_trend
table_results_MONTH[["(2)"]] <- results_total_WLS_trend_onlypost
table_results_MONTH[["(3)"]] <- results_female_WLS_trend
table_results_MONTH[["(4)"]] <- results_female_WLS_trend_onlypost
table_results_MONTH[["(5)"]] <- results_male_WLS_trend
table_results_MONTH[["(6)"]] <- results_male_WLS_trend_onlypost
## HTML table
estimates_table_MONTH(df = table_results_MONTH,
rows = rows_MONTH,
title_words = "Suicide",
gof = gm,
output_style = "html") %>%
kableExtra::add_header_above(c(" " = 1, "Total" = 2, "Female" = 2, "Male" = 2))
## 2 coefficients not defined because the design matrix is rank deficient
## 1 coefficient not defined because the design matrix is rank deficient
## 2 coefficients not defined because the design matrix is rank deficient
## 1 coefficient not defined because the design matrix is rank deficient
## 2 coefficients not defined because the design matrix is rank deficient
## 1 coefficient not defined because the design matrix is rank deficient
Suicide
|
|
Total
|
Female
|
Male
|
|
|
|
|
|
|
|
|
|
Feb. 2020
|
0.110
|
−0.007
|
0.101
|
0.022
|
0.117
|
−0.038
|
|
|
(0.104)
|
(0.074)
|
(0.132)
|
(0.097)
|
(0.146)
|
(0.123)
|
|
Mar. 2020
|
0.066
|
−0.051
|
0.008
|
−0.068
|
0.123
|
−0.037
|
|
|
(0.131)
|
(0.086)
|
(0.125)
|
(0.086)
|
(0.201)
|
(0.165)
|
|
Apr. 2020
|
0.134
|
0.016
|
0.064
|
−0.011
|
0.207
|
0.043
|
|
|
(0.142)
|
(0.078)
|
(0.135)
|
(0.089)
|
(0.190)
|
(0.118)
|
|
May. 2020
|
0.278
|
0.158
|
0.192
|
0.119
|
0.366
|
0.198
|
|
|
(0.109)
|
(0.104)
|
(0.115)
|
(0.093)
|
(0.175)
|
(0.176)
|
|
Jun. 2020
|
0.366
|
0.245
|
0.096
|
0.025
|
0.646
|
0.474
|
|
|
(0.136)
|
(0.074)
|
(0.128)
|
(0.063)
|
(0.201)
|
(0.134)
|
|
Jul. 2020
|
0.430
|
0.308
|
0.286
|
0.217
|
0.573
|
0.396
|
|
|
(0.123)
|
(0.063)
|
(0.194)
|
(0.124)
|
(0.172)
|
(0.152)
|
|
Aug. 2020
|
0.179
|
0.056
|
0.089
|
0.022
|
0.270
|
0.090
|
|
|
(0.158)
|
(0.119)
|
(0.134)
|
(0.089)
|
(0.234)
|
(0.193)
|
|
Sep. 2020
|
0.121
|
−0.003
|
0.032
|
−0.033
|
0.210
|
0.024
|
|
|
(0.150)
|
(0.091)
|
(0.121)
|
(0.079)
|
(0.232)
|
(0.155)
|
|
Sample size
|
1551
|
1551
|
1551
|
1551
|
1551
|
1551
|
|
R2 Adj.
|
0.379
|
0.379
|
0.175
|
0.176
|
0.373
|
0.376
|
|
Ref. month
|
{Jan.2020}
|
{\(\leq\)Jan.2020}
|
{Jan.2020}
|
{\(\leq\)Jan.2020}
|
{Jan.2020}
|
{\(\leq\)Jan.2020}
|
## Latex table
estimates_table_MONTH(df = table_results_MONTH,
rows = rows_MONTH,
gof = gm,
title_words = "Estimation results for suicide rates, without covariates",
output_style = "latex") %>%
kableExtra::add_header_above(c(" " = 1, "Total" = 2, "Female" = 2, "Male" = 2)) %>%
kableExtra::add_footnote(c("Notes: Columns (1), (3), and (5) present baseline WLS estimates shown in the left-hand side of Figure \\ref{fig:DID_unemploy_on_suicide}. Columns (2), (4), and (6) present WLS estimates based on the model \\eqref{eq:did_model_ver2}, weighted by prefecture population size. The treatment variable is the COVID-19-induced employment shock, which is calculated as equation \\eqref{eq:employment_shock}. Robust standard errors are clustered at the prefecture level."),threeparttable = TRUE, notation = "none",escape = FALSE) %>%
kableExtra::column_spec(2:7, width = "1.5cm") %>%
kableExtra::save_kable("output/table_unemploy_diff2_on_suicide_robust.tex")
## 2 coefficients not defined because the design matrix is rank deficient
##
## 1 coefficient not defined because the design matrix is rank deficient
## 2 coefficients not defined because the design matrix is rank deficient
## 1 coefficient not defined because the design matrix is rank deficient
## 2 coefficients not defined because the design matrix is rank deficient
## 1 coefficient not defined because the design matrix is rank deficient
Regression table/回帰結果表 with covar
# 列の選択 column order
# 男女合計、女性、男性、YOYのみ, monthlyhのみ
rows_MONTH <- tribble(~name, ~"(1)", ~"(2)", ~"(3)", ~"(4)", ~"(5)", ~"(6)",
"Ref. month", "\\footnotesize{Jan.2020}", "\\footnotesize{$\\leq$Jan.2020}", "\\footnotesize{Jan.2020}", "\\footnotesize{$\\leq$Jan.2020}","\\footnotesize{Jan.2020}", "\\footnotesize{$\\leq$Jan.2020}")
## results list
table_results_MONTH <- list()
table_results_MONTH[["(1)"]] <- results_total_WLS_trend_covar
table_results_MONTH[["(2)"]] <- results_total_WLS_trend_covar_onlypost
table_results_MONTH[["(3)"]] <- results_female_WLS_trend_covar
table_results_MONTH[["(4)"]] <- results_female_WLS_trend_covar_onlypost
table_results_MONTH[["(5)"]] <- results_male_WLS_trend_covar
table_results_MONTH[["(6)"]] <- results_male_WLS_trend_covar_onlypost
## HTML table
estimates_table_MONTH(df = table_results_MONTH,
rows = rows_MONTH,
title_words = "Suicide",
gof = gm,
output_style = "html") %>%
kableExtra::add_header_above(c(" " = 1, "Total" = 2, "Female" = 2, "Male" = 2))
## 2 coefficients not defined because the design matrix is rank deficient
## 1 coefficient not defined because the design matrix is rank deficient
## 2 coefficients not defined because the design matrix is rank deficient
## 1 coefficient not defined because the design matrix is rank deficient
## 2 coefficients not defined because the design matrix is rank deficient
## 1 coefficient not defined because the design matrix is rank deficient
Suicide
|
|
Total
|
Female
|
Male
|
|
|
|
|
|
|
|
|
|
Feb. 2020
|
−0.178
|
−0.294
|
−0.047
|
−0.126
|
−0.323
|
−0.478
|
|
|
(0.137)
|
(0.138)
|
(0.148)
|
(0.142)
|
(0.229)
|
(0.238)
|
|
Mar. 2020
|
0.004
|
−0.113
|
−0.027
|
−0.104
|
0.029
|
−0.130
|
|
|
(0.180)
|
(0.162)
|
(0.172)
|
(0.138)
|
(0.292)
|
(0.289)
|
|
Apr. 2020
|
0.103
|
−0.016
|
0.036
|
−0.039
|
0.172
|
0.008
|
|
|
(0.144)
|
(0.106)
|
(0.153)
|
(0.140)
|
(0.258)
|
(0.204)
|
|
May. 2020
|
0.198
|
0.078
|
0.088
|
0.015
|
0.308
|
0.140
|
|
|
(0.170)
|
(0.165)
|
(0.118)
|
(0.118)
|
(0.311)
|
(0.308)
|
|
Jun. 2020
|
0.201
|
0.080
|
0.082
|
0.011
|
0.329
|
0.157
|
|
|
(0.185)
|
(0.140)
|
(0.147)
|
(0.118)
|
(0.330)
|
(0.267)
|
|
Jul. 2020
|
0.522
|
0.400
|
0.518
|
0.449
|
0.521
|
0.344
|
|
|
(0.200)
|
(0.148)
|
(0.201)
|
(0.138)
|
(0.296)
|
(0.249)
|
|
Aug. 2020
|
−0.147
|
−0.270
|
−0.224
|
−0.291
|
−0.068
|
−0.248
|
|
|
(0.195)
|
(0.165)
|
(0.187)
|
(0.177)
|
(0.363)
|
(0.317)
|
|
Sep. 2020
|
0.066
|
−0.058
|
0.088
|
0.023
|
0.038
|
−0.147
|
|
|
(0.214)
|
(0.168)
|
(0.163)
|
(0.131)
|
(0.342)
|
(0.277)
|
|
Sample size
|
1551
|
1551
|
1551
|
1551
|
1551
|
1551
|
|
R2 Adj.
|
0.377
|
0.378
|
0.182
|
0.184
|
0.369
|
0.371
|
|
Ref. month
|
{Jan.2020}
|
{\(\leq\)Jan.2020}
|
{Jan.2020}
|
{\(\leq\)Jan.2020}
|
{Jan.2020}
|
{\(\leq\)Jan.2020}
|
## Latex table
estimates_table_MONTH(df = table_results_MONTH,
rows = rows_MONTH,
gof = gm,
title_words = "Estimation results for suicide rates, with covariates",
output_style = "latex") %>%
kableExtra::add_header_above(c(" " = 1, "Total" = 2, "Female" = 2, "Male" = 2)) %>%
kableExtra::add_footnote(c("Notes: Columns (1), (3), and (5) present WLS estimates shown in the right-hand side of Figure \\ref{fig:DID_unemploy_on_suicide}. Columns (2), (4), and (6) present WLS estimates based on the model \\eqref{eq:did_model_ver2}, weighted by prefecture population size, and eight covariates are additionally controlled for. The treatment variable is the COVID-19-induced employment shock, which is calculated as equation \\eqref{eq:employment_shock}. Robust standard errors are clustered at the prefecture level."),threeparttable = TRUE, notation = "none",escape = FALSE) %>%
kableExtra::column_spec(2:7, width = "1.5cm") %>%
kableExtra::save_kable("output/table_unemploy_diff2_on_suicide_robust_covar.tex")
## 2 coefficients not defined because the design matrix is rank deficient
##
## 1 coefficient not defined because the design matrix is rank deficient
## 2 coefficients not defined because the design matrix is rank deficient
## 1 coefficient not defined because the design matrix is rank deficient
## 2 coefficients not defined because the design matrix is rank deficient
## 1 coefficient not defined because the design matrix is rank deficient